home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / LIB / DESK / CORE / Desk / h / GFX < prev    next >
Text File  |  1996-05-21  |  4KB  |  103 lines

  1.  
  2. #ifndef __Desk_GFX_h
  3. #define __Desk_GFX_h
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #define Desk_plot_SOLIDBOTH 0x00
  8. #define Desk_plot_SOLIDEXFINAL 0x08
  9. #define Desk_plot_DOTTEDBOTH 0x10
  10. #define Desk_plot_DOTTEDEXFINAL 0x18
  11. #define Desk_plot_SOLIDEXINIT 0x20
  12. #define Desk_plot_SOLIDEXBOTH 0x28
  13. #define Desk_plot_DOTTEDEXINIT 0x30
  14. #define Desk_plot_DOTTEDEXBOTH 0x38
  15. #define Desk_plot_POINT 0x40
  16. #define Desk_plot_HHORZLINEFILLNB 0x48
  17. #define Desk_plot_TRIANGLEFILL 0x50
  18. #define Desk_plot_HORIZLINEFILLB 0x58
  19. #define Desk_plot_RECTANGLEFILL 0x60
  20. #define Desk_plot_HORIZLINEFILLF 0x68
  21. #define Desk_plot_PARALLELFILL 0x70
  22. #define Desk_plot_HORIZLINEFILLNF 0x78
  23. #define Desk_plot_FLOODTOBACK 0x80
  24. #define Desk_plot_FLOODTOFORE 0x88
  25. #define Desk_plot_CIRCLE 0x90
  26. #define Desk_plot_CIRCLEFILL 0x98
  27. #define Desk_plot_CIRCLEARC 0xA0
  28. #define Desk_plot_SEGMENT 0xA8
  29. #define Desk_plot_SECTOR 0xB0
  30. #define Desk_plot_BLOCK 0xB8
  31. #define Desk_plot_ELLIPSE 0xC0
  32. #define Desk_plot_ELLIPSEFILL 0xC8
  33. #define Desk_plot_GRAPHICSCHAR 0xD0
  34. #define Desk_plot_SPRITE 0xE8
  35. #define Desk_plot_MOVECURSORREL 0
  36. #define Desk_plot_DRAWRELFORE 1
  37. #define Desk_plot_DRAWRELINVERSE 2
  38. #define Desk_plot_DRAWRELBACK 3
  39. #define Desk_plot_MOVECURSORABS 4
  40. #define Desk_plot_DRAWABSFORE 5
  41. #define Desk_plot_DRAWABSINVERSE 6
  42. #define Desk_plot_DRAWABSBACK 7
  43. #define Desk_plot_BMOVEREL 0
  44. #define Desk_plot_BMOVERECTREL 1
  45. #define Desk_plot_BCOPYRECTREL 2
  46. #define Desk_plot_BMOVEABS 4
  47. #define Desk_plot_BMOVERECTABS 5
  48. #define Desk_plot_BCOPYRECTABS 6
  49. enum {
  50. Desk_gfx_action_OVERWRITE = 0,
  51. Desk_gfx_action_OR,
  52. Desk_gfx_action_AND,
  53. Desk_gfx_action_XOR,
  54. Desk_gfx_action_INVERT,
  55. Desk_gfx_action_LEAVE,
  56. Desk_gfx_action_ANDNOT,
  57. Desk_gfx_action_ORNOT,
  58. Desk_gfx_action_TRANSPARENTBACKGROUND = 8,
  59. Desk_gfx_action_COLOURPATTERN_1 = 16,
  60. Desk_gfx_action_COLOURPATTERN_2 = 32,
  61. Desk_gfx_action_COLOURPATTERN_3 = 48,
  62. Desk_gfx_action_COLOURPATTERN_4 = 64,
  63. Desk_gfx_action_COLOURPATTERN_GIANT = 80
  64. };
  65. extern void Desk_GFX_Plot(int plotcode, int x, int y);
  66. #define Desk_GFX_Move(x, y) Desk_GFX_Plot(Desk_plot_SOLIDBOTH + Desk_plot_MOVECURSORABS, x, y)
  67. #define Desk_GFX_MoveBy(x, y) Desk_GFX_Plot(Desk_plot_SOLIDBOTH + Desk_plot_MOVECURSORREL, x, y)
  68. #define Desk_GFX_PlotPoint(x, y) Desk_GFX_Plot(Desk_plot_POINT + Desk_plot_DRAWABSFORE, x, y)
  69. #define Desk_GFX_PlotPointBy(x, y) Desk_GFX_Plot(Desk_plot_POINT + Desk_plot_DRAWRELFORE, x, y)
  70. #define Desk_GFX_Draw(x, y) Desk_GFX_Plot(Desk_plot_SOLIDBOTH + Desk_plot_DRAWABSFORE, x, y)
  71. #define Desk_GFX_DrawBy(x, y) Desk_GFX_Plot(Desk_plot_SOLIDBOTH + Desk_plot_DRAWRELFORE, x, y)
  72. extern void Desk_GFX_Rectangle(int x, int y, int w, int h);
  73. #define Desk_GFX_RectangleFill(x, y, w, h) \
  74. { \
  75. Desk_GFX_Move(x, y); \
  76. Desk_GFX_Plot(Desk_plot_RECTANGLEFILL + Desk_plot_DRAWRELFORE, w, h); \
  77. }
  78. #define Desk_GFX_Circle(x, y, r) \
  79. { \
  80. Desk_GFX_Move(x, y); \
  81. Desk_GFX_Plot(Desk_plot_CIRCLE + Desk_plot_DRAWRELFORE, (r), 0); \
  82. }
  83. #define Desk_GFX_CircleFill(x, y, r) \
  84. { \
  85. Desk_GFX_Move(x, y); \
  86. Desk_GFX_Plot(Desk_plot_CIRCLEFILL + Desk_plot_DRAWRELFORE, (r), 0); \
  87. }
  88. extern void Desk_GFX_CLG(void);
  89. extern void Desk_GFX_VDU(char ch);
  90. #define VDU(C) Desk_GFX_VDU(C)
  91. #define Desk_GFX_GCOL(A, C) {Desk_GFX_VDU(18); Desk_GFX_VDU(A); Desk_GFX_VDU(C);}
  92. #define Desk_GFX_Mode(M) {Desk_GFX_VDU(22); Desk_GFX_VDU(M);}
  93. #define Desk_GFX_SetOrigin(x, y) {short a=(x), b=(y); Desk_GFX_VDU(29); \
  94. Desk_GFX_VDU(a & 0xff); Desk_GFX_VDU((a>>8) & 0xff); \
  95. Desk_GFX_VDU(b & 0xff); Desk_GFX_VDU((b>>8) & 0xff);}
  96. extern void Desk_GFX_Write0(const char *string);
  97. extern void Desk_GFX_WriteN(const char *string, int numchars);
  98. extern void Desk_GFX_Wait(void);
  99. #ifdef __cplusplus
  100. }
  101. #endif
  102. #endif
  103.